Low Complexity Aggregation in GraphLog and Datalog

نویسندگان

  • Mariano P. Consens
  • Alberto O. Mendelzon
چکیده

We present constructs for computing aggregate functions over sets of tuples and along paths in a database graph. We show how Datalog can be extended to compute a large class of queries with aggregates without incurring the large expense of a language with general set manipulation capabilities. In particular, we aim for queries that can be executed eeciently in parallel, using the class nc and its various subclasses as formal models of low parallel complexity. Our approach retains the standard relational notion of relations as sets of tuples, not requiring the introduction of multisets. In the case where no rules are recursive, the language is exactly as expressive as Klug's rst order language with aggregates. We show that this class of non-recursive programs cannot express transitive closure (unless logspace=nlogspace), thus providing evidence for a widely believed but never proven folk result. We also study the expressive 1 power and complexity of languages that support aggregation over re-cursion. We then describe how these constructs, as well as manipulating the length of paths in database graphs, are incorporated into our visual query language GraphLog. While GraphLog could easily be extended to handle all the queries described above, we prefer to restrict the language in a natural way to avoid explicit recursion; all recursion is expressed as transitive closure. We show that this guarantees all expressible queries are in nc. We analyze other proposals and show that they can express queries that are logspace-complete for p and thus unlikely to be parallelizable eeciently.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Using Hy+ for network management and distributed debugging

A network manager managing a computer network or a programmer attempting to understand and debug a distributed program both must deal with large volumes of data. Visu-alization is widely believed to help in these and similar tasks. We contend that visual-ization is indeed useful, but only if accompanied of the following facilities: abstraction, l-tering, and layout control. The Hy + visual-izat...

متن کامل

Aggregation in Datalog Under Set Semantics

We propose an extension of Datalog that supports aggregates under set semantics and is as expressive as the previous extensions of Datalog which use bag semantics to represent aggregate programs. We show that under set semantics, our extension has greater expressive power than the previous extensions of Datalog which support aggregates. By expressing aggregate Datalog queries under set semantic...

متن کامل

Datalog on infinite structures

Datalog is the relational variant of logic programming and has become a standard query language in database theory. The (program) complexity of datalog in its main context so far, on finite databases, is well known to be in EXPTIME. We research the complexity of datalog on infinite databases, motivated by possible applications of datalog to infinite structures (e.g. linear orders) in temporal a...

متن کامل

Inf-datalog, Modal Logic and Complexities

Inf-Datalog extends the usual least fixpoint semantics of Datalog with greatest fixpoint semantics: we defined inf-Datalog and characterized the expressive power of various fragments of inf-Datalog in [16]. In the present paper, we study the complexity of query evaluation on finite models for (various fragments of) infDatalog. We deduce a unified and elementary proof that global model-checking ...

متن کامل

New Expressive Languages for Ontological Query Answering

Ontology-based data access is a powerful form of extending database technology, where a classical extensional database (EDB) is enhanced by an ontology that generates new intensional knowledge which may contribute to answer a query. Recently, the Datalog± family of ontology languages was introduced; in Datalog±, rules are tuple-generating dependencies (TGDs), i.e., Datalog rules with the possib...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1990